/*
 Navicat Premium Data Transfer

 Source Server         : 162.14.113.231-hiv
 Source Server Type    : MySQL
 Source Server Version : 50650
 Source Host           : 162.14.113.231:3306
 Source Schema         : hiv

 Target Server Type    : MySQL
 Target Server Version : 50650
 File Encoding         : 65001

 Date: 04/11/2022 22:17:55
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) DEFAULT NULL COMMENT '姓名',
  `account` varchar(255) DEFAULT NULL COMMENT '账号',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '关联的医院id',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态 0禁用 1启用',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='管理员表';

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` VALUES (1, 'admin', 'admin', '123456', NULL, 1, NULL, '2022-09-18 23:10:15', '2022-07-09 18:00:44');
INSERT INTO `admin` VALUES (23, 'Test', 'Test', '123456', 4, 1, 0, NULL, '2022-09-30 22:01:26');
INSERT INTO `admin` VALUES (24, '1134503262', '1134503262', '123456', 4, 1, 0, NULL, '2022-09-30 22:02:36');
INSERT INTO `admin` VALUES (28, '测试--LIU--后台管理', 'ceshiliu', '1', 6, 1, 0, '2022-10-09 11:21:42', '2022-10-09 11:06:45');
INSERT INTO `admin` VALUES (29, '采样--刘测试', '采样--刘测试', '123456', 6, 1, 0, NULL, '2022-10-09 11:11:29');
INSERT INTO `admin` VALUES (32, 'ysl', 'ysl', '123456', 6, 1, 0, NULL, '2022-10-09 11:15:31');
INSERT INTO `admin` VALUES (33, '测试1', 'ceshi001', 'ceshi001', 33, 1, 0, NULL, '2022-10-10 09:19:48');
INSERT INTO `admin` VALUES (34, 'ceshi002', 'ceshi002', 'ceshi002', 33, 1, 0, NULL, '2022-10-10 09:22:54');
INSERT INTO `admin` VALUES (35, 'ceshi003', 'ceshi003', 'ceshi003', 33, 1, 0, NULL, '2022-10-10 09:23:23');
INSERT INTO `admin` VALUES (36, 'ceshi004', 'ceshi004', 'ceshi004', 33, 1, 0, NULL, '2022-10-10 09:24:00');
INSERT INTO `admin` VALUES (37, 'test001', 'test001', 'test001', 35, 1, 0, NULL, '2022-10-10 10:04:16');
INSERT INTO `admin` VALUES (38, 'test002', 'test002', 'test002', 35, 1, 0, '2022-10-24 11:56:09', '2022-10-10 10:07:18');
INSERT INTO `admin` VALUES (39, 'test003', 'test003', 'test003', 35, 1, 0, NULL, '2022-10-10 10:07:30');
INSERT INTO `admin` VALUES (40, 'test004', 'test004', 'test004', 35, 1, 0, NULL, '2022-10-10 10:07:40');
INSERT INTO `admin` VALUES (41, 'lxfHt', 'lxfHt', '111111', 4, 1, 0, '2022-10-17 10:37:31', '2022-10-13 09:56:33');
INSERT INTO `admin` VALUES (42, '刘--管理员', 'lgly', '111111', 6, 1, 0, NULL, '2022-10-13 10:26:43');
INSERT INTO `admin` VALUES (44, '1234修改名称', '12', '111111', 4, 1, 0, '2022-10-17 10:35:48', '2022-10-17 10:35:25');
INSERT INTO `admin` VALUES (45, '123', '23', '1', 4, 1, 0, NULL, '2022-10-17 10:36:33');
INSERT INTO `admin` VALUES (48, '小小', 'xiaoxiao', '123456', 4, 1, 0, NULL, '2022-10-17 20:04:52');
INSERT INTO `admin` VALUES (49, '1019测试', '1019cs', '123456', 48, 1, 0, NULL, '2022-10-19 09:22:52');
INSERT INTO `admin` VALUES (50, '采样1019', '1019cy', '123456', 48, 1, 0, NULL, '2022-10-19 09:25:11');
INSERT INTO `admin` VALUES (51, '医生1019', '1019ys', '123456', 48, 1, 0, NULL, '2022-10-19 09:25:51');
INSERT INTO `admin` VALUES (52, '后台1019', '1019ht', '123456', 48, 1, 0, '2022-10-19 09:27:41', '2022-10-19 09:27:30');
INSERT INTO `admin` VALUES (53, '123', '1234', '123456', 4, 1, 0, NULL, '2022-10-19 22:16:09');
INSERT INTO `admin` VALUES (54, '12345', '12345', '123456', 4, 1, 0, NULL, '2022-10-19 22:16:26');
INSERT INTO `admin` VALUES (55, '凝动测试', 'press001', '123456', 4, 1, 0, NULL, '2022-10-24 11:45:14');
COMMIT;

-- ----------------------------
-- Table structure for admin_role
-- ----------------------------
DROP TABLE IF EXISTS `admin_role`;
CREATE TABLE `admin_role` (
  `admin_id` bigint(20) NOT NULL COMMENT '管理员ID',
  `role_id` int(11) NOT NULL COMMENT '角色ID',
  `operator` varchar(50) NOT NULL DEFAULT '' COMMENT '操作人',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`admin_id`,`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='管理员角色关系表';

-- ----------------------------
-- Records of admin_role
-- ----------------------------
BEGIN;
INSERT INTO `admin_role` VALUES (1, 1, '', '2022-05-21 17:53:29', '2022-05-21 17:53:29');
INSERT INTO `admin_role` VALUES (23, 2, 'admin', '2022-09-30 22:01:26', '2022-09-30 22:01:26');
INSERT INTO `admin_role` VALUES (24, 20, 'Test', '2022-09-30 22:02:36', '2022-09-30 22:02:36');
INSERT INTO `admin_role` VALUES (28, 2, 'lceshi', '2022-10-09 11:21:42', '2022-10-09 11:21:42');
INSERT INTO `admin_role` VALUES (29, 24, '测试--LIU', '2022-10-09 11:11:29', '2022-10-09 11:11:29');
INSERT INTO `admin_role` VALUES (32, 25, '测试--LIU', '2022-10-09 11:15:31', '2022-10-09 11:15:31');
INSERT INTO `admin_role` VALUES (33, 2, 'admin', '2022-10-10 09:19:48', '2022-10-10 09:19:48');
INSERT INTO `admin_role` VALUES (34, 29, '测试1', '2022-10-10 09:22:54', '2022-10-10 09:22:54');
INSERT INTO `admin_role` VALUES (35, 27, '测试1', '2022-10-10 09:24:14', '2022-10-10 09:24:14');
INSERT INTO `admin_role` VALUES (36, 28, '测试1', '2022-10-10 09:24:00', '2022-10-10 09:24:00');
INSERT INTO `admin_role` VALUES (37, 2, 'admin', '2022-10-10 10:04:16', '2022-10-10 10:04:16');
INSERT INTO `admin_role` VALUES (38, 30, 'test001', '2022-10-10 10:07:18', '2022-10-10 10:07:18');
INSERT INTO `admin_role` VALUES (39, 31, 'test001', '2022-10-10 10:07:30', '2022-10-10 10:07:30');
INSERT INTO `admin_role` VALUES (40, 32, 'test001', '2022-10-10 10:07:40', '2022-10-10 10:07:40');
INSERT INTO `admin_role` VALUES (41, 33, 'Test', '2022-10-13 09:56:33', '2022-10-13 09:56:33');
INSERT INTO `admin_role` VALUES (42, 2, 'lxfHt', '2022-10-13 10:26:43', '2022-10-13 10:26:43');
INSERT INTO `admin_role` VALUES (44, 2, 'lxfHt', '2022-10-17 10:35:48', '2022-10-17 10:35:48');
INSERT INTO `admin_role` VALUES (45, 2, 'lxfHt', '2022-10-17 10:36:33', '2022-10-17 10:36:33');
INSERT INTO `admin_role` VALUES (48, 20, 'Test', '2022-10-17 20:04:52', '2022-10-17 20:04:52');
INSERT INTO `admin_role` VALUES (49, 2, 'admin', '2022-10-19 09:22:58', '2022-10-19 09:22:58');
INSERT INTO `admin_role` VALUES (50, 35, '1019测试', '2022-10-19 09:25:15', '2022-10-19 09:25:15');
INSERT INTO `admin_role` VALUES (51, 36, '1019测试', '2022-10-19 09:25:51', '2022-10-19 09:25:51');
INSERT INTO `admin_role` VALUES (52, 37, '1019测试', '2022-10-19 09:27:41', '2022-10-19 09:27:41');
INSERT INTO `admin_role` VALUES (53, 20, 'Test', '2022-10-19 22:16:48', '2022-10-19 22:16:48');
INSERT INTO `admin_role` VALUES (54, 34, 'Test', '2022-10-19 22:16:45', '2022-10-19 22:16:45');
INSERT INTO `admin_role` VALUES (55, 2, 'admin', '2022-10-24 11:45:14', '2022-10-24 11:45:14');
COMMIT;

-- ----------------------------
-- Table structure for bar_code
-- ----------------------------
DROP TABLE IF EXISTS `bar_code`;
CREATE TABLE `bar_code` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id',
  `code` varchar(255) DEFAULT NULL COMMENT '条码编号',
  `check_type` tinyint(1) DEFAULT NULL COMMENT '类型 1病载含量检测 2耐药性检测',
  `num` int(11) DEFAULT NULL COMMENT '条码数量',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态 1待出库 2已出库',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='条码表';

-- ----------------------------
-- Records of bar_code
-- ----------------------------
BEGIN;
INSERT INTO `bar_code` VALUES (1, 4, '1061788922', 1, NULL, 2, 0, '2022-10-18 22:27:58', '2022-10-18 22:27:51');
INSERT INTO `bar_code` VALUES (2, 4, '4975410948', 1, NULL, 2, 0, '2022-10-18 22:27:58', '2022-10-18 22:27:51');
INSERT INTO `bar_code` VALUES (3, 4, '0696141936', 1, NULL, 2, 0, '2022-10-18 22:27:58', '2022-10-18 22:27:52');
INSERT INTO `bar_code` VALUES (4, 4, '4606828198', 1, NULL, 2, 0, '2022-10-18 22:27:58', '2022-10-18 22:27:52');
INSERT INTO `bar_code` VALUES (5, 4, '0079269829', 1, NULL, 2, 0, '2022-10-18 22:27:58', '2022-10-18 22:27:52');
INSERT INTO `bar_code` VALUES (6, 48, '3578167091', 2, NULL, 2, 0, '2022-10-19 09:30:16', '2022-10-19 09:22:11');
INSERT INTO `bar_code` VALUES (7, 48, '6278617607', 2, NULL, 2, 0, '2022-10-19 09:30:16', '2022-10-19 09:22:11');
INSERT INTO `bar_code` VALUES (8, 48, '7137868805', 2, NULL, 2, 0, '2022-10-19 09:30:16', '2022-10-19 09:22:11');
INSERT INTO `bar_code` VALUES (9, 48, '1659338344', 2, NULL, 2, 0, '2022-10-19 09:30:16', '2022-10-19 09:22:11');
INSERT INTO `bar_code` VALUES (10, 48, '3809368387', 2, NULL, 2, 0, '2022-10-19 09:30:16', '2022-10-19 09:22:11');
INSERT INTO `bar_code` VALUES (11, 48, '5992070433', 1, NULL, 2, 0, '2022-10-19 10:26:39', '2022-10-19 10:26:35');
INSERT INTO `bar_code` VALUES (12, 48, '6538596748', 1, NULL, 2, 0, '2022-10-19 10:26:39', '2022-10-19 10:26:35');
INSERT INTO `bar_code` VALUES (13, 4, '0034883486', 1, NULL, 2, 0, '2022-10-19 22:26:14', '2022-10-19 22:26:10');
INSERT INTO `bar_code` VALUES (14, 48, '6188596620', 2, NULL, 2, 0, '2022-10-20 09:03:55', '2022-10-20 09:03:50');
INSERT INTO `bar_code` VALUES (15, 48, '2743894058', 2, NULL, 2, 0, '2022-10-20 09:03:55', '2022-10-20 09:03:50');
INSERT INTO `bar_code` VALUES (16, 48, '0401694776', 1, NULL, 2, 0, '2022-10-20 09:17:26', '2022-10-20 09:17:23');
INSERT INTO `bar_code` VALUES (17, 48, '3421075314', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (18, 48, '9331495488', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (19, 48, '6045534266', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (20, 48, '9985684909', 1, NULL, 2, 0, '2022-10-21 09:10:16', '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (21, 48, '9209806652', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (22, 48, '0935042957', 1, NULL, 2, 0, '2022-10-21 09:08:29', '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (23, 48, '9028647948', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (24, 48, '8355928177', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (25, 48, '6571757511', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (26, 48, '6463774785', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (27, 48, '9533645114', 1, NULL, 1, 0, NULL, '2022-10-21 09:07:02');
INSERT INTO `bar_code` VALUES (28, 48, '0114206420', 1, NULL, 2, 0, '2022-10-21 09:25:44', '2022-10-21 09:25:38');
INSERT INTO `bar_code` VALUES (29, 48, '5401551764', 1, NULL, 2, 0, '2022-10-21 09:25:44', '2022-10-21 09:25:38');
COMMIT;

-- ----------------------------
-- Table structure for batch
-- ----------------------------
DROP TABLE IF EXISTS `batch`;
CREATE TABLE `batch` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `code` varchar(255) DEFAULT NULL COMMENT '批次号',
  `express` varchar(255) DEFAULT NULL COMMENT '快递编号',
  `express_status` tinyint(1) DEFAULT '1' COMMENT '快递状态 1待寄出 2配送中 3已收件',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='批次表';

-- ----------------------------
-- Records of batch
-- ----------------------------
BEGIN;
INSERT INTO `batch` VALUES (1, 'jtcjrdbdux', 'SF001', 2, 4, 0, '2022-10-20 22:34:06', '2022-10-18 22:29:22');
INSERT INTO `batch` VALUES (2, 'rmpnqvrdoz', 'SF008', 2, 4, 0, '2022-10-20 22:34:07', '2022-10-18 22:40:40');
INSERT INTO `batch` VALUES (3, 'b9cjfr2iv3', 'SF009', 2, 4, 0, '2022-10-20 22:34:15', '2022-10-18 23:05:23');
INSERT INTO `batch` VALUES (4, 'aoyf0uxd76', '1019sfkd', 2, 48, 0, '2022-10-20 22:34:35', '2022-10-19 09:36:38');
INSERT INTO `batch` VALUES (5, 'mbqthf90yo', '1019sf002', 2, 48, 0, '2022-10-20 22:34:41', '2022-10-19 10:21:43');
INSERT INTO `batch` VALUES (6, 'm3e34z49dd', '1019003', 2, 48, 0, '2022-10-20 22:34:49', '2022-10-19 10:29:29');
INSERT INTO `batch` VALUES (7, 'hrn3qxw5x3', '102000', 2, 4, 0, '2022-10-20 22:34:56', '2022-10-20 09:12:47');
COMMIT;

-- ----------------------------
-- Table structure for hospital
-- ----------------------------
DROP TABLE IF EXISTS `hospital`;
CREATE TABLE `hospital` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) DEFAULT NULL COMMENT '医院名称',
  `address` varchar(1024) DEFAULT NULL COMMENT '医院地址',
  `parent_id` bigint(20) DEFAULT '0' COMMENT '上级医院id',
  `level` int(11) DEFAULT '1' COMMENT '层级',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态 0禁用 1启用',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='医院表';

-- ----------------------------
-- Records of hospital
-- ----------------------------
BEGIN;
INSERT INTO `hospital` VALUES (2, '华西医院1号', '信息详细地址', 1, 2, 1, 0, NULL, '2022-09-30 21:43:28');
INSERT INTO `hospital` VALUES (3, '疾控中心', '四川成都', 0, 1, 1, 0, '2022-10-09 10:49:45', '2022-09-30 22:00:52');
INSERT INTO `hospital` VALUES (4, 'xxx华西一号医院', '四川成都', 3, 2, 1, 0, NULL, '2022-09-30 22:01:07');
INSERT INTO `hospital` VALUES (5, '和乐检测中心', '四川省成都市双流区和乐2街150号', 0, 1, 1, 0, '2022-10-17 11:03:38', '2022-10-09 10:41:23');
INSERT INTO `hospital` VALUES (6, '和乐1街检测点和乐1街检测点和乐1街检', '四川省成都市双流区和乐1街', 5, 2, 1, 0, '2022-10-17 11:03:38', '2022-10-09 10:44:04');
INSERT INTO `hospital` VALUES (15, '中德检测点--禁用', '四川省成都市双流区中德英伦联邦C区', 0, 1, 1, 0, '2022-10-17 10:41:35', '2022-10-09 10:45:29');
INSERT INTO `hospital` VALUES (26, '2', '2', 7, 2, 0, 0, NULL, '2022-10-09 10:47:29');
INSERT INTO `hospital` VALUES (27, '22', '22', 7, 2, 0, 0, NULL, '2022-10-09 10:47:34');
INSERT INTO `hospital` VALUES (28, '222', '222', 7, 2, 0, 0, NULL, '2022-10-09 10:47:37');
INSERT INTO `hospital` VALUES (29, '2222', '2222', 7, 2, 0, 0, NULL, '2022-10-09 10:47:41');
INSERT INTO `hospital` VALUES (30, '和乐3街检测点', '四川省成都市双流区和乐3街', 5, 2, 1, 0, '2022-10-17 11:03:38', '2022-10-09 10:49:35');
INSERT INTO `hospital` VALUES (31, '关东2街检测点', '四川省成都市双流区关东2街检测点', 15, 2, 1, 0, '2022-10-17 10:41:35', '2022-10-09 10:50:48');
INSERT INTO `hospital` VALUES (32, '演示机构', '演示地址', 0, 1, 1, 0, NULL, '2022-10-10 09:18:59');
INSERT INTO `hospital` VALUES (33, '演示医院', '演示地址', 32, 2, 1, 0, NULL, '2022-10-10 09:19:22');
INSERT INTO `hospital` VALUES (34, '演示机构2', '演示地址', 0, 1, 1, 0, NULL, '2022-10-10 10:03:24');
INSERT INTO `hospital` VALUES (35, 'Test医院', '测试地址', 34, 2, 1, 0, NULL, '2022-10-10 10:03:49');
INSERT INTO `hospital` VALUES (48, '1019测试机构', '成都市双流区', 0, 1, 1, 0, '2022-10-19 09:21:57', '2022-10-19 09:21:31');
COMMIT;

-- ----------------------------
-- Table structure for patient
-- ----------------------------
DROP TABLE IF EXISTS `patient`;
CREATE TABLE `patient` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id',
  `sampling_id` bigint(20) DEFAULT NULL COMMENT '采样记录id',
  `antiviral_code` varchar(50) DEFAULT NULL COMMENT '抗病毒编码',
  `check_type` tinyint(1) DEFAULT NULL COMMENT '类型 1病载含量检测 2耐药性检测',
  `content` double(10,2) DEFAULT NULL COMMENT '病载/耐药含量',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='患者表';

-- ----------------------------
-- Records of patient
-- ----------------------------
BEGIN;
INSERT INTO `patient` VALUES (1, 4, 1, '001', 1, NULL, 0, '2022-10-20 22:26:33', '2022-10-18 22:28:13');
INSERT INTO `patient` VALUES (2, 4, 2, '002', 1, NULL, 0, '2022-10-20 22:26:37', '2022-10-18 22:28:23');
INSERT INTO `patient` VALUES (3, 4, 3, '003', 1, NULL, 0, '2022-10-20 22:26:41', '2022-10-18 22:40:02');
INSERT INTO `patient` VALUES (4, 4, 4, '004', 1, NULL, 0, '2022-10-20 22:26:44', '2022-10-18 23:04:06');
INSERT INTO `patient` VALUES (5, 4, 5, '005', 1, NULL, 0, '2022-10-20 22:26:46', '2022-10-18 23:04:21');
INSERT INTO `patient` VALUES (6, 48, 6, 'cy001', 2, NULL, 0, '2022-10-20 22:26:51', '2022-10-19 09:30:24');
INSERT INTO `patient` VALUES (7, 48, 7, 'cy002', 2, NULL, 0, '2022-10-20 22:26:52', '2022-10-19 09:30:57');
INSERT INTO `patient` VALUES (8, 48, 8, 'cy003', 2, NULL, 0, '2022-10-20 22:26:53', '2022-10-19 09:31:16');
INSERT INTO `patient` VALUES (9, 48, 9, 'cy004', 2, NULL, 0, '2022-10-20 22:26:54', '2022-10-19 09:31:52');
INSERT INTO `patient` VALUES (10, 48, 10, 'cy005', 2, NULL, 0, '2022-10-20 22:26:55', '2022-10-19 10:21:16');
INSERT INTO `patient` VALUES (11, 48, 11, 'cy006', 1, NULL, 0, '2022-10-20 22:26:56', '2022-10-19 10:28:51');
INSERT INTO `patient` VALUES (12, 4, 12, '991', 1, NULL, 0, '2022-10-20 22:26:59', '2022-10-19 22:26:23');
INSERT INTO `patient` VALUES (13, 48, 13, '1020cy', 2, NULL, 0, '2022-10-20 22:27:00', '2022-10-20 09:11:34');
INSERT INTO `patient` VALUES (14, 48, 14, '1020cy', 2, NULL, 0, '2022-10-20 22:27:01', '2022-10-20 09:11:54');
INSERT INTO `patient` VALUES (15, 48, 15, '10200cy', 1, NULL, 0, '2022-10-20 22:27:02', '2022-10-20 09:17:47');
INSERT INTO `patient` VALUES (16, 48, 22, '2021002', 1, NULL, 0, NULL, '2022-10-21 10:03:02');
COMMIT;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `parent_id` int(11) NOT NULL COMMENT '上一级id',
  `name` varchar(20) NOT NULL COMMENT '权限名称',
  `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '权限类型： 0：页面，1：按钮',
  `code` varchar(50) DEFAULT '' COMMENT '权限CODE',
  `descpt` varchar(100) NOT NULL DEFAULT '' COMMENT '权限描述',
  `operator` varchar(50) NOT NULL DEFAULT '' COMMENT '操作人',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11009 DEFAULT CHARSET=utf8 COMMENT='管理员权限表';

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES (10000, 0, '数据概览', 0, 'DATA_SHOW_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10001, 0, '机构管理', 0, 'HOSPITAL_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10002, 0, '患者管理', 0, 'PATIENT_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10003, 0, '条码管理', 0, 'BAR_CODE_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10004, 0, '采样管理', 0, 'SAMPLING_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10005, 0, '入库管理', 0, 'STORAGE_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10006, 0, '检测管理', 0, 'CHECK_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10007, 0, '系统管理', 0, 'SYSTEM_PAGE', '', '', '2022-05-21 17:46:03', '2022-05-21 17:46:03');
INSERT INTO `permission` VALUES (10008, 0, '机构账号管理', 0, 'HOSPITAL_ACCOUNT_PAGE', '', '', '2022-09-18 08:35:20', '2022-09-18 08:35:20');
INSERT INTO `permission` VALUES (11000, 10005, '入库统计表', 1, 'STORAGE_STATISTICS_PAGE', '', '', '2022-05-21 17:46:04', '2022-05-21 17:46:04');
INSERT INTO `permission` VALUES (11001, 10005, '批次管理', 1, 'STORAGE_BATCH_PAGE', '', '', '2022-05-21 17:46:04', '2022-05-21 17:46:04');
INSERT INTO `permission` VALUES (11002, 10007, '角色管理', 1, 'HOSPITAL_ROLE_PAGE', '', '', '2022-05-21 17:46:04', '2022-05-21 17:46:04');
INSERT INTO `permission` VALUES (11003, 10007, '账号管理', 1, 'HOSPITAL_BUSINESS_ACCOUNT_PAGE', '', '', '2022-05-21 17:46:04', '2022-05-21 17:46:04');
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(20) NOT NULL COMMENT '角色名称',
  `desc` varchar(50) DEFAULT '' COMMENT '角色描述',
  `platform` tinyint(1) DEFAULT NULL COMMENT '角色所属平台 1小程序端 2管理端',
  `wechat_role_type` tinyint(1) DEFAULT NULL COMMENT '小程序端角色类型 1检测员 2医生',
  `super_admin_id` bigint(20) DEFAULT NULL COMMENT '创建角色的超级管理员||医院超级管理员',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id',
  `operator` varchar(50) DEFAULT '' COMMENT '操作人',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COMMENT='管理员角色表';

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES (1, '平台超级管理员', '', 2, NULL, NULL, NULL, '超级管理员', '2022-05-21 17:46:05', '2022-05-21 17:46:05');
INSERT INTO `role` VALUES (2, '医院超级管理员', NULL, 2, NULL, 4, NULL, '超级管理员', '2022-09-18 21:17:04', '2022-09-18 21:17:04');
INSERT INTO `role` VALUES (20, '采样', NULL, 1, 1, 23, 4, 'Test', '2022-09-30 22:02:00', '2022-09-30 22:02:00');
INSERT INTO `role` VALUES (24, '采样--刘11', NULL, 1, 1, 28, 6, '测试--LIU--后台管理', '2022-10-09 11:08:47', '2022-10-09 11:08:47');
INSERT INTO `role` VALUES (25, '医生--刘', NULL, 1, 2, 28, 6, '测试--LIU', '2022-10-09 11:09:35', '2022-10-09 11:09:35');
INSERT INTO `role` VALUES (26, '和乐--后台', NULL, 2, NULL, 28, 6, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role` VALUES (27, '医院库管员', NULL, 2, NULL, 33, 33, '测试1', '2022-10-10 09:21:05', '2022-10-10 09:21:05');
INSERT INTO `role` VALUES (28, '医院检测员', NULL, 2, NULL, 33, 33, '测试1', '2022-10-10 09:21:31', '2022-10-10 09:21:31');
INSERT INTO `role` VALUES (29, '医院采样员', NULL, 1, 1, 33, 33, '测试1', '2022-10-10 09:21:43', '2022-10-10 09:21:43');
INSERT INTO `role` VALUES (30, 'Test采样员', NULL, 1, 1, 37, 35, 'test001', '2022-10-10 10:05:11', '2022-10-10 10:05:11');
INSERT INTO `role` VALUES (31, '入库管理', NULL, 2, NULL, 37, 35, 'test001', '2022-10-10 10:06:44', '2022-10-10 10:06:44');
INSERT INTO `role` VALUES (32, '检验管理', NULL, 2, NULL, 37, 35, 'test001', '2022-10-10 10:06:53', '2022-10-10 10:06:53');
INSERT INTO `role` VALUES (33, '刘--后台管理', NULL, 2, NULL, 23, 4, 'Test', '2022-10-13 09:55:52', '2022-10-13 09:55:52');
INSERT INTO `role` VALUES (34, '采样1', NULL, 1, 1, 23, 4, 'Test', '2022-10-17 10:34:32', '2022-10-17 10:34:32');
INSERT INTO `role` VALUES (35, '采样1019', NULL, 1, 1, 49, 48, '1019测试', '2022-10-19 09:24:22', '2022-10-19 09:24:22');
INSERT INTO `role` VALUES (36, '医生1019', NULL, 1, 2, 49, 48, '1019测试', '2022-10-19 09:24:30', '2022-10-19 09:24:30');
INSERT INTO `role` VALUES (37, '后台1019', NULL, 2, NULL, 49, 48, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
COMMIT;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
  `role_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  `operator` varchar(50) NOT NULL DEFAULT '' COMMENT '操作人',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`role_id`,`permission_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限关系表';

-- ----------------------------
-- Records of role_permission
-- ----------------------------
BEGIN;
INSERT INTO `role_permission` VALUES (1, 10001, 'admin-init', '2022-09-18 08:36:49', '2022-09-18 08:36:49');
INSERT INTO `role_permission` VALUES (1, 10003, 'admin-init', '2022-09-19 22:17:36', '2022-09-19 22:17:36');
INSERT INTO `role_permission` VALUES (1, 10008, 'admin-init', '2022-09-18 08:37:00', '2022-09-18 08:37:00');
INSERT INTO `role_permission` VALUES (2, 10000, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 10002, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 10004, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 10005, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 10006, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 10007, 'admin-init', '2022-09-25 14:51:29', '2022-09-25 14:51:29');
INSERT INTO `role_permission` VALUES (2, 11000, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 11001, 'admin-init', '2022-09-25 14:40:25', '2022-09-25 14:40:25');
INSERT INTO `role_permission` VALUES (2, 11002, 'admin-init', '2022-09-25 14:51:43', '2022-09-25 14:51:43');
INSERT INTO `role_permission` VALUES (2, 11003, 'admin-init', '2022-09-25 14:51:55', '2022-09-25 14:51:55');
INSERT INTO `role_permission` VALUES (26, 10000, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10001, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10002, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10003, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10004, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10005, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10006, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 10008, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 11000, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (26, 11001, '测试--LIU', '2022-10-09 11:10:53', '2022-10-09 11:10:53');
INSERT INTO `role_permission` VALUES (27, 10005, '测试1', '2022-10-10 09:21:05', '2022-10-10 09:21:05');
INSERT INTO `role_permission` VALUES (27, 11000, '测试1', '2022-10-10 09:21:05', '2022-10-10 09:21:05');
INSERT INTO `role_permission` VALUES (27, 11001, '测试1', '2022-10-10 09:21:05', '2022-10-10 09:21:05');
INSERT INTO `role_permission` VALUES (28, 10006, '测试1', '2022-10-10 09:21:31', '2022-10-10 09:21:31');
INSERT INTO `role_permission` VALUES (31, 10005, 'test001', '2022-10-10 10:06:44', '2022-10-10 10:06:44');
INSERT INTO `role_permission` VALUES (31, 11000, 'test001', '2022-10-10 10:06:44', '2022-10-10 10:06:44');
INSERT INTO `role_permission` VALUES (31, 11001, 'test001', '2022-10-10 10:06:44', '2022-10-10 10:06:44');
INSERT INTO `role_permission` VALUES (32, 10006, 'test001', '2022-10-10 10:06:53', '2022-10-10 10:06:53');
INSERT INTO `role_permission` VALUES (33, 10000, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (33, 10002, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (33, 10004, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (33, 10005, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (33, 10006, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (33, 11000, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (33, 11001, 'Test', '2022-10-18 22:07:07', '2022-10-18 22:07:07');
INSERT INTO `role_permission` VALUES (37, 10000, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
INSERT INTO `role_permission` VALUES (37, 10002, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
INSERT INTO `role_permission` VALUES (37, 10004, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
INSERT INTO `role_permission` VALUES (37, 10005, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
INSERT INTO `role_permission` VALUES (37, 10006, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
INSERT INTO `role_permission` VALUES (37, 11000, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
INSERT INTO `role_permission` VALUES (37, 11001, '1019测试', '2022-10-19 09:24:45', '2022-10-19 09:24:45');
COMMIT;

-- ----------------------------
-- Table structure for sampling_box
-- ----------------------------
DROP TABLE IF EXISTS `sampling_box`;
CREATE TABLE `sampling_box` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id',
  `sampler_id` bigint(20) DEFAULT NULL COMMENT '采样员id',
  `sampling_num` int(11) DEFAULT '0' COMMENT '盒内样品数据量',
  `batch_id` bigint(20) DEFAULT NULL COMMENT '批次id',
  `box_code` varchar(255) DEFAULT NULL COMMENT '盒子编号',
  `express` varchar(255) DEFAULT NULL COMMENT '快递编号',
  `express_status` tinyint(1) DEFAULT '1' COMMENT '快递状态 1待寄出 2配送中 3已收件',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态 1正常 2损坏 4温控异常',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='采样盒子表';

-- ----------------------------
-- Records of sampling_box
-- ----------------------------
BEGIN;
INSERT INTO `sampling_box` VALUES (1, 4, 48, 2, 1, 'gc20af7r', 'SF001', 2, 1, 0, '2022-10-18 22:29:22', '2022-10-18 22:28:31');
INSERT INTO `sampling_box` VALUES (2, 4, 48, 1, 2, 'xi99celx', 'SF008', 2, 1, 0, '2022-10-18 22:40:40', '2022-10-18 22:40:07');
INSERT INTO `sampling_box` VALUES (3, 4, 48, 2, 3, '8faqmgfi', 'SF009', 2, 1, 0, '2022-10-18 23:05:23', '2022-10-18 23:04:36');
INSERT INTO `sampling_box` VALUES (4, 48, 50, 2, 4, 'ds4w6ydq', '1019sfkd', 2, 2, 0, '2022-10-19 10:19:37', '2022-10-19 09:35:27');
INSERT INTO `sampling_box` VALUES (5, 48, 50, 1, 4, 'wbztuzd4', '1019sfkd', 2, 4, 0, '2022-10-19 10:15:39', '2022-10-19 09:36:09');
INSERT INTO `sampling_box` VALUES (6, 48, 50, 1, 5, '1fjidaq7', '1019sf002', 2, 1, 0, '2022-10-19 10:21:43', '2022-10-19 10:21:23');
INSERT INTO `sampling_box` VALUES (7, 48, 50, 1, 6, 'wkbkxumb', '1019003', 2, 1, 0, '2022-10-19 10:29:29', '2022-10-19 10:29:07');
INSERT INTO `sampling_box` VALUES (8, 4, 48, 1, 7, 'edsysm94', '102000000000000000000000000000000000000000000888888888888888582835353525252828382858582858585828285828282828582828383868282', 2, 1, 0, '2022-10-20 09:12:47', '2022-10-19 22:26:56');
INSERT INTO `sampling_box` VALUES (9, 48, 50, 2, 7, '3x5m8pdt', '102000000000000000000000000000000000000000000888888888888888582835353525252828382858582858585828285828282828582828383868282', 2, 1, 0, '2022-10-20 09:12:47', '2022-10-20 09:12:00');
INSERT INTO `sampling_box` VALUES (10, 4, 48, 0, NULL, '7yazdxut', NULL, 1, 1, 0, NULL, '2022-10-20 22:30:45');
COMMIT;

-- ----------------------------
-- Table structure for sampling_box_record
-- ----------------------------
DROP TABLE IF EXISTS `sampling_box_record`;
CREATE TABLE `sampling_box_record` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `box_id` bigint(20) DEFAULT NULL COMMENT '盒子id',
  `sampling_id` bigint(20) DEFAULT NULL COMMENT '采样id',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='采样数据盒子关系表';

-- ----------------------------
-- Records of sampling_box_record
-- ----------------------------
BEGIN;
INSERT INTO `sampling_box_record` VALUES (1, 1, 1, 0, NULL, '2022-10-18 22:28:52');
INSERT INTO `sampling_box_record` VALUES (2, 1, 2, 0, NULL, '2022-10-18 22:28:57');
INSERT INTO `sampling_box_record` VALUES (3, 2, 3, 0, NULL, '2022-10-18 22:40:20');
INSERT INTO `sampling_box_record` VALUES (4, 3, 4, 0, NULL, '2022-10-18 23:04:55');
INSERT INTO `sampling_box_record` VALUES (5, 3, 5, 0, NULL, '2022-10-18 23:05:04');
INSERT INTO `sampling_box_record` VALUES (8, 4, 6, 0, NULL, '2022-10-19 09:35:59');
INSERT INTO `sampling_box_record` VALUES (9, 4, 7, 0, NULL, '2022-10-19 09:36:04');
INSERT INTO `sampling_box_record` VALUES (10, 5, 8, 0, NULL, '2022-10-19 09:36:19');
INSERT INTO `sampling_box_record` VALUES (11, 6, 10, 0, NULL, '2022-10-19 10:21:26');
INSERT INTO `sampling_box_record` VALUES (12, 7, 11, 0, NULL, '2022-10-19 10:29:12');
INSERT INTO `sampling_box_record` VALUES (13, 8, 12, 0, NULL, '2022-10-19 22:29:34');
INSERT INTO `sampling_box_record` VALUES (14, 9, 14, 0, NULL, '2022-10-20 09:12:10');
INSERT INTO `sampling_box_record` VALUES (15, 9, 13, 0, NULL, '2022-10-20 09:12:16');
COMMIT;

-- ----------------------------
-- Table structure for sampling_record
-- ----------------------------
DROP TABLE IF EXISTS `sampling_record`;
CREATE TABLE `sampling_record` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id',
  `sampler_id` bigint(20) DEFAULT NULL COMMENT '采样员id',
  `antiviral_code` varchar(50) DEFAULT NULL COMMENT '抗病毒编码',
  `bar_code` varchar(50) DEFAULT NULL COMMENT '采样条形码',
  `check_type` tinyint(1) DEFAULT NULL COMMENT '类型 1病载含量检测 2耐药性检测',
  `sampling_status` tinyint(1) DEFAULT NULL COMMENT '采样状态 0失败 1成功',
  `sample_status` tinyint(1) DEFAULT '0' COMMENT '样品状态  0待送检 1入库正常 2样品破损 3额外样品 4其他异常 5检测中 6已完成',
  `resampling_status` tinyint(1) DEFAULT '0' COMMENT '重采状态 0未重采 1已重采',
  `inspection_sampling_status` tinyint(1) DEFAULT NULL COMMENT '检测时样品状态 1样品正常 2样品异常',
  `storage_time` datetime DEFAULT NULL COMMENT '入库时间',
  `storager_id` bigint(20) DEFAULT NULL COMMENT '入库员id',
  `inspection_time` datetime DEFAULT NULL COMMENT '检测时间',
  `inspector_id` bigint(20) DEFAULT NULL COMMENT '检测员id',
  `finish_time` datetime DEFAULT NULL COMMENT '检测完成时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '删除状态 0未删除 1已删除',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='采样数据表';

-- ----------------------------
-- Records of sampling_record
-- ----------------------------
BEGIN;
INSERT INTO `sampling_record` VALUES (1, 4, 48, '001', '0696141936', 1, 1, 5, 0, 1, '2022-10-18 22:30:28', 23, '2022-10-18 22:53:16', 23, NULL, 0, '2022-10-18 22:53:15', '2022-10-18 22:28:13');
INSERT INTO `sampling_record` VALUES (2, 4, 48, '002', '4606828198', 1, 1, 4, 1, NULL, '2022-10-18 22:31:18', 23, NULL, NULL, NULL, 0, '2022-10-21 00:04:48', '2022-10-18 22:28:23');
INSERT INTO `sampling_record` VALUES (3, 4, 48, '003', '0079269829', 1, 1, 4, 1, NULL, '2022-10-18 22:40:59', 23, NULL, NULL, NULL, 0, '2022-10-18 22:51:39', '2022-10-18 22:40:02');
INSERT INTO `sampling_record` VALUES (4, 4, 48, '004', '1061788922', 1, 1, 1, 0, NULL, '2022-10-18 23:06:30', 23, NULL, NULL, NULL, 0, '2022-10-18 23:06:30', '2022-10-18 23:04:06');
INSERT INTO `sampling_record` VALUES (5, 4, 48, '005', '4975410948', 1, 0, 5, 1, 2, '2022-10-18 23:06:44', 23, '2022-10-18 23:07:02', 23, NULL, 0, '2022-10-21 00:01:46', '2022-10-18 23:04:21');
INSERT INTO `sampling_record` VALUES (6, 48, 50, 'cy001', '3809368387', 2, 1, 2, 1, NULL, '2022-10-19 09:42:22', 52, NULL, NULL, NULL, 0, '2022-10-19 10:19:53', '2022-10-19 09:30:24');
INSERT INTO `sampling_record` VALUES (7, 48, 50, 'cy002', '1659338344', 2, 1, 2, 1, NULL, '2022-10-19 09:42:37', 52, NULL, NULL, NULL, 0, '2022-10-19 10:19:53', '2022-10-19 09:30:57');
INSERT INTO `sampling_record` VALUES (8, 48, 50, 'cy003', '7137868805', 2, 1, 4, 1, NULL, '2022-10-19 09:42:49', 52, NULL, NULL, NULL, 0, '2022-10-19 10:17:58', '2022-10-19 09:31:16');
INSERT INTO `sampling_record` VALUES (9, 48, 50, 'cy004', '6278617607', 2, 1, 5, 0, 2, '2022-10-19 09:42:54', 52, '2022-10-20 23:39:57', 52, NULL, 0, '2022-10-20 23:47:10', '2022-10-19 09:31:52');
INSERT INTO `sampling_record` VALUES (10, 48, 50, 'cy005', '3578167091', 2, 1, 5, 0, 1, '2022-10-19 10:22:14', 52, '2022-10-19 10:22:48', 52, NULL, 0, '2022-10-19 10:22:48', '2022-10-19 10:21:16');
INSERT INTO `sampling_record` VALUES (11, 48, 50, 'cy006', '6538596748', 1, 1, 5, 0, 1, '2022-10-19 10:29:52', 52, '2022-10-19 10:30:00', 52, NULL, 0, '2022-10-19 10:30:00', '2022-10-19 10:28:51');
INSERT INTO `sampling_record` VALUES (12, 4, 48, '991', '0034883486', 1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2022-10-19 22:26:23');
INSERT INTO `sampling_record` VALUES (13, 48, 50, '1020cy', '2743894058', 2, 1, 5, 0, 1, '2022-10-20 09:16:06', 52, '2022-10-20 09:16:15', 52, NULL, 0, '2022-10-20 09:16:15', '2022-10-20 09:11:34');
INSERT INTO `sampling_record` VALUES (14, 48, 50, '1020cy', '6188596620', 2, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2022-10-20 09:11:54');
INSERT INTO `sampling_record` VALUES (15, 48, 50, '10200cy', '0401694776', 1, 1, 1, 0, NULL, '2022-10-20 09:17:59', 52, NULL, NULL, NULL, 0, '2022-10-20 09:17:59', '2022-10-20 09:17:47');
INSERT INTO `sampling_record` VALUES (22, 48, 50, '2021002', '5401551764', 1, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '2022-10-21 10:03:02');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
